package net.eicp.jxcontent.cms.snippet

import net.eicp.jxcontent.core.snippet.JXDispatchSnippet
import net.liftweb.common._
import net.liftweb.http._
import net.liftweb.http.S._
import net.liftweb.util._
import net.liftweb.util.Helpers._
import net.liftweb.mapper._
import scala.xml._
import net.eicp.jxcontent.core.snippet.JXSnippetScope

class ListRender1 extends JXDispatchSnippet with Logger {
  override def dispatch = {case "render1" => render1 _}
  
  def render1(scope: JXSnippetScope) = {
      10 =>> {() =>
        scope.saveOrUpdate( _ match {
          case ("JXTest", a: List[Int] @unchecked) => ("JXTest", a ::: List(1, 2, 3))
        })("JXTest", List(1, 2, 3))
      }
  }
}